<?php $this->load('header')?>

<?php $this->showTabs() ?>

<div class="main">

<div class="search">
	<form name="search" method="post" action="<?php echo URL('tag.index')?>">
		<fieldset>
			<legend>标签查找</legend>
				文章数：
				<input type="text" name="min" size="6" value="<?php echo $min?>" /> -
				<input type="text" name="max" size="6" value="<?php echo $max?>" />
				关键字：
				<input type="text" name="keyword" size="15" value="<?php echo $keyword?>" />
				<input type="submit" name="s" class="button" value="开始查找" />
				<input type="button" class="button" value="所有标签" onclick="window.location.href='<?php echo URL('tag.index')?>'" />
		</fieldset>
	</form>
</div>
<form name="op" method="post" action="<?php echo URL('tag.index')?>">
<input type="hidden" name="dosubmit" value="yes" />
	<table class="datalist" cellspacing="0" id="list">
		<tr>
			<th width="50" class="firstcol">选择</th>
			<th width="300">名称</th>
			<th width="100">文章数</th>
			<th>&nbsp;</th>
		</tr>
		<?php
		if ( $list ) {
			foreach ($list as $row) { ?>
		<tr id="row_<?php echo $row['id']?>">
			<td align="center"><input type="checkbox" name="id[]" value="<?php echo $row['id']?>" class="checkbox" /></td>
			<td><a href="<?php echo URL('tag.edit', 'id='.$row['id'])?>"><?php echo $row['tagname']?></a></td>
			<td align="center"><b style="color:red"><?php echo $row['count']?></b></td>
			<td>&nbsp;</td>
		</tr>
		<?php
			}
		} else {
			echo '<tr><td colspan="10">暂无记录...</td></tr>';
		}
		?>
		<tr>
			<td align="center">
			<input type="checkbox" class="checkbox" value="1" name="chkall" onclick="check_all(this)" /></td>
			<td colspan="4">
			全选
			<input type="radio" name="ac" value="recount" id="recount" checked="checked" class="checkbox" /><label for="recount">更新统计</label>
			<input type="radio" name="ac" value="del" id="del" class="checkbox" /><label for="delete">删除</label>
			<input type="radio" name="ac" value="merge" id="merge" class="checkbox" /><label for="merge">合并到：</label>
			<input type="text" name="newtag" onclick="$('#merge').attr('checked',true)" size="8" style="display:inline" />
			<input type="submit" name="submit" value="执行操作" class="submit" />
			</td>
		</tr>
		<tr>
			<td colspan="5"><?php echo $pagebar ?></td>
		</tr>
	</table>
</form>

</div>

<?php $this->load('footer')?>